Helping Kids with Coding For Dummies by Camille McCue Ph.D & Sarah Guthals PhD

Helping Kids with Coding For Dummies by Camille McCue Ph.D & Sarah Guthals PhD

Author:Camille McCue, Ph.D & Sarah Guthals PhD [McCue, Camille & Guthals, Sarah]
Language: eng
Format: epub
ISBN: 9781119380665
Publisher: Wiley
Published: 2018-05-15T00:00:00+00:00


Figure 9-4 shows a switch statement written in Java along with the result of the program execution.

FIGURE 9-4: Java code, written in BlueJ, demonstrating use of a switch statement for selecting pizza serving quantities (top), and its output (bottom).

Advanced Logic, Unplugged

Young coders typically code simple conditionals before moving on to more complex logic. Your coder will want to level up his logic skills by putting together more than one condition. Doing so allows him to create compound conditionals, facilitating the selection of many different routes through a program.

Prior to diving into the actual programming details of compound conditionals (many conditionals put together), help your coders cement the logic of working with multiple if-then statements in more familiar settings. Many beloved childhood board games and puzzles are predicated on logical operations, including Guess Who, Clue, and Mastermind. Playing and winning the game requires players to construct and use conditionals, specifically compound conditionals. Here is what each game addresses:

Guess Who (Figure 9-5) is a sort of whodoneit? two-player game that's perfect for the early elementary crowd. In Guess Who, each of two players possess a set of characters with different hair color, eye color, and clothing accessories. Each player selects a “mark” and her opponent attempts to guess the identity of the mark by asking true/false questions to eliminate characters. Following the elimination of all characters who don’t match, the character who remains is the mark. Ultimately, finding the mark is a process of executing a compound conditional statement. For example, “if the person (is a redhead and wears glasses and not male) then the person is the mark.”

Clue (Figure 9-6) is another classic whodoneit? game, with multiple players working to solve a murder mystery. Players of all ages, from elementary schoolers through octogenarians enjoy Clue. Game action involves each player rolling dice to move game pieces around the board and make conjectures about who committed the crime, the type of murder weapon, and the room in which the crime occurred. Following each conjecture, other players report a part of the conjecture as true or false. Learning what is true and false provides clues that advance the player ever closer to solving the mystery. Best of all, your young coder will learn that, determining whether “Colonel Mustard did it and he did it in the Ballroom and he used the Candlestick,” is great practice for writing complex conditionals!

Mastermind (Figure 9-7) is a code-making and code-breaking two-player game in which one player makes a code and her opponent works to break the code. Kids of middle school age and older find this game incredibly fun and addictive. Each code consists of four pegs, which can be arranged in any sequence using pegs of six different colors. The code breaker takes a shot in the dark on the first guess, for example guessing purple-purple-yellow-yellow. The code maker then indicates, how many pegs are not correct; how many are the correct color and not correct position; and how many are the correct color and correct position.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Popular ebooks
Eco-friendly approach of bio-indigo synthesis and developing purification methods towards isolation of indigo from indirubin and bacterial fragments by Ramalingam Manivannan & Kaliyan Prabakaran & Young-A Son(205182)
Personalized inhaled bacteriophage therapy for treatment of multidrug-resistant Pseudomonas aeruginosa in cystic fibrosis by unknow(173687)
CONSORT 2025 statement: updated guideline for reporting randomized trials by unknow(82111)
Critical evaluation of the ProfiLER-02 study design and outcomes by Vivek Subbiah & Razelle Kurzrock(81719)
Cardiac gene therapy makes a comeback by Oliver J. Müller & Susanne Hille & Anca Kliesow Remes(81515)
Whisky: Malt Whiskies of Scotland (Collins Little Books) by dominic roskrow(74432)
Unveiling the design rules for tunable emission in graphene quantum dots: A high-throughput TDDFT and machine learning perspective by Şener Özönder & Mustafa Coşkun Özdemir & Caner Ünlü(50886)
A yeast-based oral therapeutic delivers immune checkpoint inhibitors to reduce intestinal tumor burden by unknow(40256)
Covalent hitchhikers guide proteins to the nucleus by Alexander F. Russell & Madeline F. Currie & Champak Chatterjee(40214)
Meet the Authors: Christopher R. Mansfield and Emily R. Derbyshire by Christopher R. Mansfield & Emily R. Derbyshire(40091)
Alkaline-earth metals promote propane dehydrogenation with carbon dioxide through geometric effects: Altering the reaction pathway by unknow(32728)
Induced iron vacancies boosting FeOOH loaded on sustainable Fenton-like collagen fiber membrane for efficient removal of emerging contaminants by unknow(32504)
Efficient electric-field-assisted photochemical conversion of methane to n-propanol exclusively over penetrated TiO2Ti hollow fibers by Guanghui Feng(32451)
Bi2SiO5 nanosheets as piezo-photocatalyst for efficient degradation of 2,4-Dichlorophenol by Hangyu Shi & Yifu Li & Lishan Zhang & Guoguan Liu & Qian Zhang & Xuan Ru & Shan Zhong(32383)
A novel NDIPTA organic heterojunction photocatalyst with built-in electric field for efficient hydrogen production by Jiahui Yang & Baojun Ma & Yongfa Zhu(32359)
Enhanced conversion of methane to liquid-phase oxygenates via hollow ferrite nanotube@horseradish peroxidase based photoenzymatic catalysis by Jun Duan & Shiying Fan & Xinyong Li & Shaomin Liu(32330)
Ordered macroporous superstructure of defective carbon adorned with tiny cobalt sulfide for selective electrocatalytic hydrogenation of cinnamaldehyde by Xiao-Shi Yuan & Sheng-Hua Zhou & San-Mei Wang & Wenbo Wei & Xiaofang Li & Xin-Tao Wu & Qi-Long Zhu(32256)
What's Done in Darkness by Kayla Perrin(27141)
Topological analysis of non-conjugated ethylene oxide cored dendrimers decorated with tetraphenylethylene: Insights from degree-based descriptors using the polynomial approach by A Theertha Nair & D Antony Xavier & Annmaria Baby & S Akhila(26518)
Investigation of mechanical and self-healing properties of hydroxyl-terminated polybutadiene functionalized with 2-ureido-4-pyrimidinone by Mohsen Kazazi & Mehran Hayaty & Ali Mousaviazar(26455)